<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="manage" />
<title>Trash management</title>
</head>
<body>
	<div class="wrapper-manage-trash">
		<div id="spinner" class="hidden"></div>
		<!-- left panel -->
		<g:render template="/manage/managePartial/leftPanelPartial"></g:render>
		<!-- End left panel -->
		<!-- Right panel -->
		<div class="rightpanel">
			<!-- Render partial -->
			<g:render template="/manage/contextMenuPartial/trashMenuContextPartial"></g:render>
			<g:render template="/manage/trashPartial/trashbuttonPartial"></g:render>
			<g:render template="/manage/modalPartial/confirmDeleteDocumentPartial"></g:render>
			<g:render template="/manage/modalPartial/confirmRestoreAllDocumentPartial"></g:render>
			<g:render template="/manage/modalPartial/messageRestoreDocumentPartial"></g:render>
			<!-- End render partial -->
			<div class="tableTrashDiv">
				<table id="dataTableTrash" class="table table-striped" cellspacing="0">
					<thead>
						<tr>
							<th>Name</th>
							<th>Position</th>
							<th>Kind</th>
							<th>Size</th>
							<th>Modified</th>
							<th>Type</th>
							<th>UserEmail</th>
						</tr>
					</thead>

					<tbody>
						<g:each var="document" in="${listDocuments}" status="i">
							<tr>
								<g:if test="${document.documentType == 0}">
									<td><a href="#"><asset:image src="iconManage/Folder.png" />&nbsp;&nbsp;<span>${document.documentName}</span></a></td>
								</g:if>
								<g:else>
									<td><a href="#"><asset:image src="iconManage/${listDocumentExtension.get(i).replaceAll('\\s','_')}.png" />&nbsp;&nbsp;<span>${document.documentName}</span></a></td>
								</g:else>
								<td>${document.documentPath}</td>
								
								<g:if test="${document.documentType == 0}">
									<g:if test="${document.isSharedFolder == true}">
										<td>shared folder</td>
									</g:if>
									<g:else>
										<td>folder</td>
									</g:else>
								</g:if>
								<g:else>
									<td>--</td>
								</g:else>
								<td>${document.documentCapacity} Kb</td>
								<td><g:formatDate format="yyyy-MM-dd HH:mm" date="${document.createDate}"/></td>
								<td>${document.documentType}</td>
								<td>${document.userEmail}</td>
							</tr>
						</g:each>
					</tbody>
				</table>
			</div>
		</div>
		<div style="clear: both;"></div>
	</div>
	<asset:javascript src="lib/jquery.dataTables.js" />
	<asset:javascript src="lib/dataTables.responsive.js" />
	<asset:javascript src="lib/dataTables.bootstrap.js" />
	<asset:javascript src="js/document/trashManagement.js" />
	<asset:javascript src="js/document/folderManagement.js" />
	<asset:javascript src="js/manage/trash-context-menu.js"/>
</body>
</html>